home *** CD-ROM | disk | FTP | other *** search
- //testwri.cpp -- simple test routine for WritePrivateProfileString
- #include "profiles.h"
- #include <string.h>
- #include <iostream.h>
-
-
- void main()
- {
- char app[81];
- char key[81];
- char string[81];
- int no ;
- //-- part one , test getting all keys for an application
- cout << "This test uses file test.ini\n";
- //-- part two, repeatedly test getting a specific key
- for (;;)
- {
- cout << "Application :";
- cin.get(app,sizeof(app));
- cin.ignore();
- cout << "Key :";
- cin.get(key,sizeof(key)) ;
- cin.ignore();
- cout << "String :";
- cin.get(string,sizeof(string)) ;
- cin.ignore();
- no = WritePrivateProfileString
- (app,key,string,"test.ini");
- cout << "no : " << no << "\n" ;
- }
- }
-
- //-- end of testwri.cpp